The present invention relates to the field of accessing bundle resources and, more particularly, to creating a bundle resource at a client.
OSGi” is a modularity technology for Java. Within OSGi, a bundle is a unit of modularity. One example of a bundle is a raw artifact of a binary Java jar file with additional bundle metadata that describes the identity and externals of the bundle. Herein, the bundle is referred to as the “bundle resource”, the raw artifact is referred to as the “artifact resource”, and the metadata for the bundle referred to as the “metadata resource”. Resources are also known as objects. (Java and all Java-based trademarks and logos are trademarks or registered trademarks of Oracle and/or its affiliates.)
There are a large number of Open Source Software (OSS) Java projects available that are not OSGi enabled. An example of such an OSS project is one that provides Plain Old Java Objects (POJO). A POJO is an ordinary Java object. If a user wants to use such a POJO in an OSGi framework, the user has to define the metadata resource and create a bundle resource by combining the original artifact resource with the new metadata resource.
Bundle repositories can be repositories of pre-bundlized jars. Some repositories are created for the purpose of helping users adopt OSGi. One example of a bundle repository is SpringSource Enterprise Bundle Repository. This allows users to search for bundles and download them for use in their builds/runtime. The EBR comprises artifacts under a vast array of OSS licenses.
The OSGi Bundle Repository (OBR) is an OSGi draft specification that defines how to use a bundle repository for resolution of bundle dependencies. There are two stages to this process:
1. Reasoning about metadata for a bundle (the actual raw artifact resource is not required at this point).
2. Downloading any binaries for the chosen bundle. The location of the binary artifacts can be held in the metadata in stage 1.
However, one problem with such an EBR is that some raw OSS artifact resources can affect the terms under which the metadata resources are provided to a user. Enterprise providers of EBRs want to be able to provide appropriate bundle resources to users, but want to keep the constituent parts of the bundle resources apart.